<?php
/**
 * HTML5 <=> PHP
 */

class Server
{
	private function __construct()
	{
		defined('APP_PATH') or define('APP_PATH', dirname(dirname($_SERVER['SCRIPT_FILENAME'])).'/');
		defined('RUNTIME_PATH') or define('RUNTIME_PATH', APP_PATH.'Runtime/' );
		defined('MYGC_PATH') or define('MYGC_PATH', APP_PATH.'Mygc/' );
		
		require 'common/runtime.php';
	}
	
	public function gameCommon( $requestdata )
	{
		//$GLOBALS['game_requestdata'] = $requestdata;
		
		$mygc = Core::GetInstance();
		$mygc->preload( $requestdata );
		$mygc->start();
		$mygc->proccess();

		//unset( $GLOBALS['game_requestdata'] );
		return $mygc->result();
	}
	
	public function outputManageHtmlIndex() 
	{
		$manage = Core::GetInstance();
		$manage->start();
		
		$requestdata = array( 999, 0 );
		$mygc->preload( $requestdata );
		$mygc->start();
		$mygc->proccess();
		
	}
}

$my = new Server();


$my->outputHtmlIndex();

//$my = new Server();
//$data = array( 1, 6, 12, array( 1, 2, 10 ) );
//$my->gameCommon( $data );
?>